package com.atguigu.spzx.user.api;

import com.atguigu.spzx.common.result.Result;
import com.atguigu.spzx.user.dto.UserAddressDetailsRespDto;
import com.atguigu.spzx.user.service.UserAddressService;
import com.atguigu.spzx.user.vo.UserAddressQueryRespVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * UserAddressController
 * </p>
 *
 * @author flyduck
 * @since 2023/11/6
 */
@Api(tags = "用户地址管理接口")
@RestController
@RequestMapping("/api/user/userAddress")
public class UserAddressApiController {

    @Autowired
    private UserAddressService userAddressService;

    @ApiOperation("根据收货地址id获取收货地址")
    @GetMapping("/getUserAddressById/{id}")
    public UserAddressDetailsRespDto getUserAddressById(@PathVariable Long id) {
        UserAddressDetailsRespDto respDto = userAddressService.getUserAddressById(id);
        return respDto;
    }
}
